const Item = ({ content, delItem, changeCheck }) => {
  const editContent = () => {
    console.log('修改内容')
  }

  return content.map((item) => {
    return (
      <li key={item.id} className={item.check === true ? 'completed' : ''}>
        <div className="view">
          <input
            onChange={() => changeCheck(item.id)}
            className="toggle"
            type="checkbox"
            checked={item.check === true ? 'checked' : ''}
          />
          <label>{item.label}</label>
          <button className="destroy" onClick={() => delItem(item.id)}></button>
          <input
            className="edit"
            onChange={editContent}
            value="Create a TodoMVC template"
          />
        </div>
      </li>
    )
  })
}

export default Item
